# -*- coding: utf-8 -*-
import pygame
from pygame.locals import *
from sys import exit

pygame.init()
SCREEN_SIZE = (640, 480)
screen = pygame.display.set_mode(SCREEN_SIZE, 0, 32)

font = pygame.font.SysFont("arial", 16);
font_height = font.get_linesize()
event_text = []

string = "King Critter is awesome!"
pyrimid = ""
i = 0



while True:
	   
	event = pygame.event.poll()
		
	if event.type == QUIT:
		exit()
	
	for _ in xrange(len(string)):
		pyrimid += string[i]
		screen.fill((255, 255, 255))
		screen.blit( font.render(pyrimid, True, (0, 0, 0)), (0, 20) )
		pygame.display.update()
		pygame.time.delay(100)
		i += 1
		event = pygame.event.poll()
		
		if event.type == QUIT:
			exit()
			
	screen.fill((255, 255, 255))		
	pyrimid = ""
	i = 0
